import request from '@/utils/request'

// 获取员工列表数据
export function getEmployeeList(params) {
  return request({
    methods: 'get',
    url: '/sys/user',
    params
  })
}

// 封装删除API
export function delEmplpyeeList(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}
// export const delEmplpyeeList = params => {
//   return request.delete(`/sys/user/${params}`, { params })
// }

// 封装添加API
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}

export function fetchImportExcel(data) {
  return request({
    url: '/sys/user/batch',
    method: 'POST',
    data
  })
}
export function fetchAssignRole(data) {
  return request({
    url: '/sys/user/assignRoles',
    method: 'PUT',
    data
  })
}
